package com.ruoyi.merchant.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.ServiceEvaluateMapper;
import com.ruoyi.merchant.domain.ServiceEvaluate;
import com.ruoyi.merchant.service.IServiceEvaluateService;

/**
 * 服务评价Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-12
 */
@Service
public class ServiceEvaluateServiceImpl implements IServiceEvaluateService {
    @Autowired
    private ServiceEvaluateMapper serviceEvaluateMapper;

    /**
     * 查询服务评价
     *
     * @param id 服务评价主键
     * @return 服务评价
     */
    @Override
    public ServiceEvaluate selectServiceEvaluateById(Integer id) {
        return serviceEvaluateMapper.selectServiceEvaluateById(id);
    }

    /**
     * 查询服务评价列表
     *
     * @param serviceEvaluate 服务评价
     * @return 服务评价
     */
    @Override
    public List<ServiceEvaluate> selectServiceEvaluateList(ServiceEvaluate serviceEvaluate) {
        return serviceEvaluateMapper.selectServiceEvaluateList(serviceEvaluate);
    }

    /**
     * 新增服务评价
     *
     * @param serviceEvaluate 服务评价
     * @return 结果
     */
    @Override
    public int insertServiceEvaluate(ServiceEvaluate serviceEvaluate) {
        return serviceEvaluateMapper.insertServiceEvaluate(serviceEvaluate);
    }

    /**
     * 修改服务评价
     *
     * @param serviceEvaluate 服务评价
     * @return 结果
     */
    @Override
    public int updateServiceEvaluate(ServiceEvaluate serviceEvaluate) {
        return serviceEvaluateMapper.updateServiceEvaluate(serviceEvaluate);
    }

    /**
     * 批量删除服务评价
     *
     * @param ids 需要删除的服务评价主键
     * @return 结果
     */
    @Override
    public int deleteServiceEvaluateByIds(Integer[] ids) {
        return serviceEvaluateMapper.deleteServiceEvaluateByIds(ids);
    }

    /**
     * 删除服务评价信息
     *
     * @param id 服务评价主键
     * @return 结果
     */
    @Override
    public int deleteServiceEvaluateById(Integer id) {
        return serviceEvaluateMapper.deleteServiceEvaluateById(id);
    }
}
